package raf;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
public class CopyDemo {
    public static void main(String[] args) throws IOException {
        RandomAccessFile src=new RandomAccessFile("./dei.dei.jpeg","r");
        RandomAccessFile desc=new RandomAccessFile("./dei.dei.gg.jpeg","rw");
           int d;
        while((d=src.read())!=-1){
            desc.write(d);
        }
           src.close();
        desc.close();
    }
}